package com.it.plic.Menthod;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * @author げっしょく
 * @date 2021/8/10
 */
public class Test2 {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException {
        Class aClass = Class.forName("com.it.plic.Menthod.Student");
        Method getMenoy = aClass.getMethod("getMenoy");
        Student n = (Student) aClass.newInstance();
        Object invoke = getMenoy.invoke(n);
        System.out.println(invoke);
    }
}
